const dictionariesList = [
  {
    id: 1,
    dictionariesName: '部门',
    dictionariesCode: '2001',
  },
  {
    id: 2,
    dictionariesName: '职级',
    dictionariesCode: '2002',
  },
  {
    id: 2,
    dictionariesName: '品牌',
    dictionariesCode: '2002',
  },
  {
    id: 3,
    dictionariesName: '职业',
    dictionariesCode: '2003',
  },
]

const dictionariesValueList = [
  {
    id: 1,
    dictionariesValueName: '综合办',
    dictionariesCode: '2001',
    createTime: '2023-06-05 16:52:23',
    updateTime: '2023-06-05 16:58:23',
    desc: '无',
    sort: 1,
  },
  {
    id: 2,
    dictionariesValueName: '人力资源部',
    dictionariesCode: '2001',
    createTime: '2023-06-05 16:52:23',
    updateTime: '2023-06-05 16:57:23',
    desc: '无',
    sort: 2,
  },
  {
    id: 3,
    dictionariesValueName: '技术部',
    dictionariesCode: '2001',
    createTime: '2023-06-05 16:52:23',
    updateTime: '2023-06-05 16:58:23',
    desc: '无',
    sort: 3,
  },
  {
    id: 4,
    dictionariesValueName: '采购部',
    dictionariesCode: '2001',
    createTime: '2023-06-05 16:52:23',
    updateTime: '2023-06-05 16:58:23',
    desc: '无',
    sort: 4,
  },
  {
    id: 5,
    dictionariesValueName: '研发部',
    dictionariesCode: '2001',
    createTime: '2023-06-05 16:52:23',
    updateTime: '2023-06-05 16:58:23',
    desc: '无',
    sort: 5,
  },
  {
    id: 6,
    dictionariesValueName: '财务部',
    dictionariesCode: '2001',
    createTime: '2023-06-05 16:52:23',
    updateTime: '2023-06-05 16:58:23',
    desc: '无',
    sort: 6,
  },
  {
    id: 7,
    dictionariesValueName: '品控部',
    dictionariesCode: '2001',
    createTime: '2023-06-05 16:52:23',
    updateTime: '2023-06-05 16:58:23',
    desc: '无',
    sort: 7,
  },
  {
    id: 8,
    dictionariesValueName: 'P1',
    dictionariesCode: '2002',
    createTime: '2023-06-05 16:52:23',
    updateTime: '2023-06-05 16:58:23',
    desc: '无',
    sort: 1,
  },
  {
    id: 9,
    dictionariesValueName: 'P2',
    dictionariesCode: '2002',
    createTime: '2023-06-05 16:52:23',
    updateTime: '2023-06-05 16:58:23',
    desc: '无',
    sort: 2,
  },
  {
    id: 10,
    dictionariesValueName: 'P3',
    dictionariesCode: '2002',
    createTime: '2023-06-05 16:52:23',
    updateTime: '2023-06-05 16:58:23',
    desc: '无',
    sort: 3,
  },
  {
    id: 11,
    dictionariesValueName: 'P4',
    dictionariesCode: '2002',
    createTime: '2023-06-05 16:52:23',
    updateTime: '2023-06-05 16:58:23',
    desc: '无',
    sort: 4,
  },
  {
    id: 12,
    dictionariesValueName: 'Apple',
    dictionariesCode: '2003',
    createTime: '2023-06-05 16:52:23',
    updateTime: '2023-06-05 16:58:23',
    desc: '无',
    sort: 1,
  },
  {
    id: 13,
    dictionariesValueName: 'Huawei',
    dictionariesCode: '2003',
    createTime: '2023-06-05 16:52:23',
    updateTime: '2023-06-05 16:58:23',
    desc: '无',
    sort: 2,
  },
  {
    id: 14,
    dictionariesValueName: '小米',
    dictionariesCode: '2003',
    createTime: '2023-06-05 16:52:23',
    updateTime: '2023-06-05 16:58:23',
    desc: '无',
    sort: 3,
  },
  {
    id: 15,
    dictionariesValueName: 'VIVO',
    dictionariesCode: '2003',
    createTime: '2023-06-05 16:52:23',
    updateTime: '2023-06-05 16:58:23',
    desc: '无',
    sort: 4,
  },
  {
    id: 16,
    dictionariesValueName: 'OPPO',
    dictionariesCode: '2003',
    createTime: '2023-06-05 16:52:23',
    updateTime: '2023-06-05 16:58:23',
    desc: '无',
    sort: 5,
  },
  {
    id: 17,
    dictionariesValueName: '射手',
    dictionariesCode: '2004',
    createTime: '2023-06-05 16:52:23',
    updateTime: '2023-06-05 16:58:23',
    desc: '无',
    sort: 1,
  },
  {
    id: 18,
    dictionariesValueName: '战士',
    dictionariesCode: '2004',
    createTime: '2023-06-05 16:52:23',
    updateTime: '2023-06-05 16:58:23',
    desc: '无',
    sort: 2,
  },
  {
    id: 18,
    dictionariesValueName: '坦克',
    dictionariesCode: '2004',
    createTime: '2023-06-05 16:52:23',
    updateTime: '2023-06-05 16:58:23',
    desc: '无',
    sort: 3,
  },
  {
    id: 17,
    dictionariesValueName: '刺客',
    dictionariesCode: '2004',
    createTime: '2023-06-05 16:52:23',
    updateTime: '2023-06-05 16:58:23',
    desc: '无',
    sort: 4,
  },
  {
    id: 18,
    dictionariesValueName: '法师',
    dictionariesCode: '2004',
    createTime: '2023-06-05 16:52:23',
    updateTime: '2023-06-05 16:58:23',
    desc: '无',
    sort: 5,
  },
]

export default [
  {
    url: '/dictionaries/getDictionariesList',
    method: 'get',
    response: () => {
      return {
        code: 200,
        message: 'ok',
        data: dictionariesList,
      }
    },
  },
  {
    url: '/dictionaries/getDictionariesValueList',
    method: 'get',
    response: (data = {}) => {
      const { dictionariesCode } = data.query
      let retDictionariesValueList = []
      dictionariesValueList.forEach((dictionariesValue) => {
        if (dictionariesValue.dictionariesCode == dictionariesCode) {
          retDictionariesValueList.push(dictionariesValue)
        }
      })

      return {
        code: 200,
        message: 'ok',
        data: retDictionariesValueList,
      }
    },
  },
]
